{#自定义：修改表容器#}
{%- block form_widget_compound -%}
        {%- if form.parent is empty -%}
            {{ form_errors(form) }}
        {%- endif -%}
        {{- block('form_rows') -}}
        {{- form_rest(form) -}}
{%- endblock form_widget_compound -%}

{#自定义：单行结果显示#}
{% block form_row %}
    {% spaceless %}
        <dl>
            <dt>{{ form_label(form) }}</dt>
            <dd>
                {{ form_widget(form) }}
                {{ form_errors(form) }}
            </dd>
        </dl>
    {% endspaceless %}
{% endblock form_row %}

{#自定义：普通文本#}
{% block text_widget %}
    {% set type = type|default('text') %}
    <input type="{{ type }}"  class="input normal" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
{% endblock text_widget %}

{#自定义：普通文本#}
{%- block form_widget_simple -%}
    {%- set type = type|default('text') -%}
    <input type="{{ type }}"  class="input normal" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
{%- endblock form_widget_simple -%}

{#自定义：图片 改写自URL#}
{%- block search_widget -%}
    {%- set type = 'text' -%}
    <input type="{{ type }}"  class="input normal upload-path" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
    <div class="upload-box upload-img"></div>
{%- endblock search_widget -%}

{#自定义：图片 新增类型#}
{%- block pic_widget -%}
    {%- set type = 'text' -%}
    <input type="{{ type }}"  class="input normal upload-path" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
    <div class="upload-box upload-img"></div>
{%- endblock pic_widget -%}

{#自定义：下拉列表#}
{%- block choice_widget_collapsed -%}
    {%- if required and placeholder is none and not placeholder_in_choices and not multiple -%}
        {% set required = false %}
    {%- endif -%}
    <div class="rule-single-select">
        <select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}>
            {%- if placeholder is not none -%}
                <option value=""{% if required and value is empty %} selected="selected"{% endif %}>{{ placeholder != '' ? (translation_domain is same as(false) ? placeholder : placeholder|trans({}, translation_domain)) }}</option>
            {%- endif -%}
            {%- if preferred_choices|length > 0 -%}
                {% set options = preferred_choices %}
                {{- block('choice_widget_options') -}}
                {%- if choices|length > 0 and separator is not none -%}
                    <option disabled="disabled">{{ separator }}</option>
                {%- endif -%}
            {%- endif -%}
            {%- set options = choices -%}
            {{- block('choice_widget_options') -}}
        </select>
    </div>
{%- endblock choice_widget_collapsed -%}

{#自定义：单选复选框#}
{%- block choice_widget_expanded -%}
    <div {{ block('widget_container_attributes') }}>
        {%- for child in form %}
            {{- form_widget(child) -}}
        {% endfor -%}
    </div>
{%- endblock choice_widget_expanded -%}

{#自定义：多选#}
{%- block checkbox_widget -%}
    <label>{{ label }}<input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} /></label>
{%- endblock checkbox_widget -%}

{#自定义：单选#}
{%- block radio_widget -%}
    <label>{{ label }}<input type="radio" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} /></label>
{%- endblock radio_widget -%}

{#自定义：报错#}
{%- block form_errors -%}
    {%- if errors|length > 0 -%}
        <ul>
            {%- for error in errors -%}
                <span class="Validform_checktip Validform_wrong">{{ error.message }}</span>
            {%- endfor -%}
        </ul>
    {%- endif -%}
{%- endblock form_errors -%}